package com.mc.ddd;

import com.mc.mapper.model.User;
import com.mc.service.IUserService;
import com.mc.service.log.ILogService;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;

/**
 * @author fumengchao
 * @ClassName DddInfoE.java
 * @Description TODO
 * @createTime 2020 1225 14:16:00
 */
@Data
public class DddInfoE {

    private ILogService logService;
    private IUserService userService;

    private Integer id;

    public DddInfoE() {
    }

    public DddInfoE(ILogService logService, IUserService userService) {
        this.logService = logService;
        this.userService = userService;
    }

    public DddCo getUserById() {

        User user = userService.query(id);
        DddCo dddCo = new DddCo();
        BeanUtils.copyProperties(user,dddCo);
        return dddCo;
    }

}